from common import Path_API
import os
import requests


class Interface():

    # 接口请求封装
    def interface(self, session, method1, url, data, header):
        """

        :param session:
        :param url:
        :param data:
        :return:
        """
        # self.session = session
        url1 = Path_API.BASE_URL + url
        # print(url1)
        response = session.request(method=method1, url=url1, json=data, headers=header)
        # print(response.json())
        return response
